{extend name="admin@index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <table class="layui-table">
        <input type="hidden" value="{$mcard_id}" name="mcard_id" autocomplete="off">
        <thead>
        <tr>
            <th width="100">序列</th>
            <th width="100">图片</th>
            <th width="100">服务</th>
            <th width="100">服务单价</th>
            <th width="100">数量</th>
        </tr>
        </thead>
        <tbody>
        {volist name="server_list" id="vo" }
        <tr>
            <td>{$key+1}</td>
            <td>{$vo.name}</td>
            <td><img src="{$vo.icon_img}"></td>
            <td>¥{$vo.price}</td>
            <td><input class="layui-input" type="number" min="0"  value="{$vo.server_num}"
                       name="server_data[{$vo.id}][server_num]" autocomplete="off"
                       placeholder="数量" class="layui-input"></td>

        </tr>
        {/volist}
        </tbody>
    </table>

    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use('yznForm', function () {
        var yznForm = layui.yznForm;
        yznForm.bindevent($("form.layui-form"));
    });
</script>
{/block}